package com.liuyc.lib.tools.browser

import com.google.gson.Gson

object JsonResolver {

    private val gson: Gson by lazy {
        Gson()
    }

    inline fun <reified T> jsonToObject(jsonStr: String): T {
        return gson.fromJson(jsonStr, T::class.java)
    }

    fun jsonToString(any: Any): String {
        return gson.toJson(any)
    }



}